package router

import (
	"github.com/gin-contrib/cors"
	"github.com/gin-gonic/gin"
	"rikao15/handel"
)

func Init() *gin.Engine {
	r := gin.Default()

	r.Use(cors.Default())

	r.Static("static", "./static")

	r.POST("/add", handel.Add)

	r.GET("/page", handel.Page)

	return r
}
